Repository navigation
IDE links in the compact form ?p= (raw deflate, base64url) - #34
Merged
Merged
Conversation
«IDE-Link kopieren» and «In IDE öffnen» write the IDE's compact share link (P46): the same JSON payload, its UTF-8 bytes in raw deflate (fflate 0.8.3 from jsDelivr, level 9, with SRI) as base64url without padding, in ?p= (#p= beyond 8,192 characters). Where fflate doesn't load, the old ?project= with lz-string, which the IDE reads too. check:ready covers both, with the libraries served from node_modules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
P46: the embed's «IDE-Link kopieren» and «In IDE öffnen» write the IDE's compact share link. This needs glpython-edu.github.io#40, which reads it.
What changes
=padding, in?p=(#p=beyond 8,192 characters). It's the same format as the IDE's «Teilen» (#40 has the details and a test vector) and about 40 % shorter.sha384-ETfVLWAUsU3zp3SpnQsPDbAyrF6jYv2w8aNYo6KtY2JuyxXhzYLOL7e0ATbLSIHP, identical to the npm package's file. It works synchronously, so the link is still built inside the tap (iPad: clipboard and new tab).?project=with lz-string, which the IDE reads too. The button is enabled once fflate has loaded, or once it has failed and lz-string has loaded.define).Checks
check:readyhas two new cases. The libraries are served fromnode_modules(fflate and lz-string as devDependencies, the same bytes as on jsDelivr, so the integrity hashes hold).https://glpython-edu.github.io/?p=…in base64url. Node's zlib reads it as the block's two files withmainFile.?project=…, which lz-string reads.check-macropasses.check:playerwasn't run, since this doesn't touch the ready path.Going live
?p=link would open an empty project in the old IDE.main.Manual tests
Desktop (Chrome, Safari, Firefox), in a course after the bump:
https://glpython-edu.github.io/?p=and opens the block's files in the IDE.fflate): the link is?project=…and opens too.iPad (Safari, external keyboard):
Follow-ups (not done)
🤖 Generated with Claude Code